package yang.java8.util;

import java.util.concurrent.TimeUnit;

public class MyObject extends Object {
	
	private int index;
	
	private String value;
	
	public MyObject(int index, String value) {
		this.index = index;
		this.value = value;
	}
	
	public int getIndex() {
		System.out.println(index);
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String toString() {
		System.err.println(index + Thread.currentThread().getName());
		try {
			TimeUnit.MILLISECONDS.sleep(10);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return index + value;
	}

}
